package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc UnstructuredRelationshipDto
 * @使用场景
 */
@Data
public class UnstructuredRelationshipDto
        extends BaseDto
        implements Serializable {

    /**
     * 文档关系ID
     */
    @ApiModelProperty("文档关系ID")
    private String unstructuredDataRelationshipId;

    /**
     * 文档ID
     */
    @ApiModelProperty("文档ID")
    private String unstructuredDataId;

    /**
     * 归属内容表主键ID
     */
    @ApiModelProperty("归属内容表主键ID")
    private String ownEntityId;

    /**
     * 归属父内容表主键ID
     */
    @ApiModelProperty("归属父内容表主键ID")
    private String ownParentContentId;

    /**
     * 主题内容ID
     */
    @ApiModelProperty("主题内容ID")
    private String themeContentId;

    /**
     * 文档编号
     */
    @ApiModelProperty("文档编号")
    private String unstructuredDataNumber;

    /**
     * 文档名称
     */
    @ApiModelProperty("文档名称")
    private String unstructuredDataName;

    /**
     * 文档后缀
     */
    @ApiModelProperty("文档后缀")
    private String postfix;

    /**
     * 文件大小
     */
    @ApiModelProperty("文件大小")
    private String fileSize;

    /**
     * 文件相对路径地址
     */
    @ApiModelProperty("文件相对路径地址")
    private String fileRelativePathAccess;

    /**
     * 文档明细类型 WORD:WORD文档 EXCEL:EXCEL文档 PDF:PDF文档
     */
    @ApiModelProperty("文档明细类型")
    private String unstructuredDataDetailType;

    /**
     * 是否支持预览 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否支持预览")
    private String isSupportPreview;

    /**
     * 是否来自个人网盘文件 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否来自个人网盘文件")
    private String isUserUpload;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Long orderNumber;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    /**
     * 创建人就职记录ID
     */
    @ApiModelProperty("创建人就职记录ID")
    private String createInductionId;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private Date createTime;

    /**
     * 文件全路径地址
     */
    @ApiModelProperty("文件全路径地址")
    private String fileRelativeAllPathAccess;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        UnstructuredRelationshipDto that = (UnstructuredRelationshipDto) o;
        return (
                unstructuredDataRelationshipId == that.unstructuredDataRelationshipId &&
                        unstructuredDataId == that.unstructuredDataId &&
                        ownEntityId == that.ownEntityId &&
                        ownParentContentId == that.ownParentContentId &&
                        themeContentId == that.themeContentId &&
                        unstructuredDataNumber == that.unstructuredDataNumber &&
                        unstructuredDataName == that.unstructuredDataName &&
                        postfix == that.postfix &&
                        fileSize == that.fileSize &&
                        fileRelativePathAccess == that.fileRelativePathAccess &&
                        unstructuredDataDetailType == that.unstructuredDataDetailType &&
                        isSupportPreview == that.isSupportPreview &&
                        isUserUpload == that.isUserUpload &&
                        orderNumber == that.orderNumber &&
                        operateTime == that.operateTime &&
                        createInductionId == that.createInductionId &&
                        createTime == that.createTime &&
                        fileRelativeAllPathAccess == that.fileRelativeAllPathAccess
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                unstructuredDataRelationshipId,
                unstructuredDataId,
                ownEntityId,
                ownParentContentId,
                themeContentId,
                unstructuredDataNumber,
                unstructuredDataName,
                postfix,
                fileSize,
                fileRelativePathAccess,
                unstructuredDataDetailType,
                isSupportPreview,
                isUserUpload,
                orderNumber,
                operateTime,
                createInductionId,
                createTime,
                fileRelativeAllPathAccess
        );
    }

}
